package com.windpicker.sleep.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.windpicker.sleep.general.Result;


@Controller
public class SleepController {

	
	@RequestMapping(value="/**",headers="X-Requested-With=XMLHttpRequest")
	@ResponseBody
	public Result<?> asynchronous()
	{
		return new Result<Object>(1,"对不起，系统维护中，无法处理请求",null);
	}
	
	@RequestMapping(value="/**")
	public String synchronous(Model model)
	{
		model.addAttribute("message","对不起，系统维护中，请查看公告信息");
		model.addAttribute("title","系统提示");
		return "index";
	}
}
